<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="../../../js/bootstrap-3.3.7-dist/css/bootstrap.min.css"/>
		<link rel="stylesheet" type="text/css" href="../../../css/footer.css" />
		<script src="../../../js/flexible.min.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			#content{
				padding-top: 1.6rem;
			}
			.left{
				float: left;
				width: 2.777777rem;
				height: 2.777777rem;
				
			}
			.left img{
				width: 100%;
			}
			.main{
				height: 3.194444rem;
				background-color: white;
				
			}
			.info{
				font-size: 0.402777rem;
				padding-top: 0.277777rem;
			}
			button{
				border-radius: 0.069444rem;
				border: 0;
				padding: 0.277777rem;
				color: white;
				background-color: darkgrey;
			}
		</style>
	</head>
	<body>
		<div id="wrap">
			<div id="main">
				<div id="header">
					<a id="headImg" href="javascript:history.go(-1)"><img class="headImg" src="../../../images/12.png" /></a>
					<p id="headTitle">立即支付</p>
				</div>
				<div id="content">
					<div class="main">
						<div class="left" id="imgType">
							
						</div>
						<div class="right" id="orderPay">
							
						</div>
					</div>
				</div>
			</div>
			
		</div>
		
		
	</body>
	<script src="../../../js/jquery-2.2.3.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../js/bootstrap-3.3.7-dist/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
	<script>
		$(function(){ 
			var test = window.location.href;
			//var url = test.substring(test.indexOf("?")-1,test.length);
			var sp = test.split("?");
			var spl = sp[1].split("&");
			var out_trade_no;			//订单号
			var trade_status;			//订单状态
			//循环里取出订单号和订单状态
			for(var i=0;spl.length;i++){
				if(spl[i] == null){
					break;
				}
				var cei = spl[i].split("=");
				if(cei[0] == "out_trade_no"){
					out_trade_no = cei[1];
				}
				if(cei[0] == "trade_status"){
					trade_status = cei[1];
				}
			}
			if(out_trade_no != null && trade_status == "TRADE_SUCCESS"){
				document.getElementById('orderPay').innerHTML = '<p class="info" style="padding: 20px 0 0 0; margin: 0 0 5px;">恭喜，支付已成功</p><p>订单号: <span>'+out_trade_no+'</span></p><p><a style="background:#337ab7;padding:5px 15px;margin-right:5px;color:#fff" href="../../personage/person_order.html">查看订单状态</a><a style="background:#337ab7;padding:5px 15px;margin-right:5px;color:#fff" href="../colalition.html">返回首页</a></p>';
				document.getElementById('imgType').innerHTML = '<img src="../../../images/pay/dui.png" style="width: 10vw; margin: 9vw 10vw;">';
			}else{
				document.getElementById('orderPay').innerHTML = '<p class="info">支付失败</p><p><a href="../../personage/person_order.html">查看订单状态</a><a href="../colalition.html">返回首页</a></p>';
				document.getElementById('imgType').innerHTML = '<img src="../../../images/pay/cuo.png" style="width: 10vw; margin: 9vw 10vw;">';
			}
			
		}); 
	</script>
	
</html>